/*****************************************************************************
 *
 * Copyright (c), 2004-2020,ShangHai Neotune Information Technology Co., Ltd.
 *
 * Module Name : ENVNOT~2.H
 *
 * Author :    sean
 *
 * Date :    2004-02-05
 *
 * Version :    1.00
 *
 * Description :    
 *
 * Other :    
 *
 * Function List:     <Main Function>
 *
 * Modification History
 * ---------------------------------------------------------------------------
 *  1: Data :      2004-02-05
 *    Author :     sean
 *    Version :    V100R001M00
 *    Modification : creation
 *
*****************************************************************************/

#ifndef _INCenvNotifyIfh
#define _INCenvNotifyIfh

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */

#define ENVOY_NOTIFY_COLDSTART              1
#define ENVOY_NOTIFY_LINKDOWN               2
#define ENVOY_NOTIFY_LINKUP                 3
#define ENVOY_NOTIFY_AUTH_FAILURE           4
#define ENVOY_NOTIFY_EGP_NEIGHBOR_LOSS      5
#define ENVOY_NOTIFY_ENTERPRISE_SPECIFIC    6

/* RFC1493 traps */
#define ENVOY_NOTIFY_1493_NEWROOT           1
#define ENVOY_NOTIFY_1493_TOPOLOGY          2  

#define SNMP_ENABLE  1
#define SNMP_DISABLE 2

typedef struct
{
    ulong_t     * index;        /* index of object */
    ulong_t     indexCount;     /* number of indices */
    void        *pValue;        /* value of object */
    ulong_t     valueLength;    /* buffer holding value of object */
    ulong_t     type;           /* data type of object (INTEGER, etc.) */
    uchar_t     * objectName;   /* name of object */
} varbind_t;

typedef struct
{
    varbind_t   * vbList;       /* List of varbinds */
    ulong_t     vbCount;        /* number of varbinds in the list */
} vbList_t;

typedef union
{
#if (INSTALL_ENVOY_SNMP_RFC1445_VIEWS)
    ushort_t        viewIndex;     /* view index for use with rfc1445 */
#endif

#if (INSTALL_ENVOY_SNMP_RFC2275_VIEWS)
    EBUFFER_T       viewName;      /* view name for use with rfc2275 */
#endif
} viewId_t;

IMPORT STATUS SNMP_NotifySend (uchar_t *, ulong_t *, ulong_t, vbList_t *);
IMPORT vbList_t * SNMP_NotifyVBLAlloc (ulong_t vbCount);
IMPORT STATUS SNMP_NotifyVBLVbAdd (vbList_t * vbl, uchar_t * varName,
                                  ulong_t * index, ulong_t indexCount);
IMPORT void SNMP_NotifyVBLClean (vbList_t ** vbl);
IMPORT STATUS SNMP_TrapSendLinkStatus (ulong_t trapType, ulong_t ifIndex);
STATUS SNMP_SendColdTrap2 (void);

#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif /* _INCenvNotifyIfh */
